package thread_calculator;

public class Main {
    public static void main(String[] args) {
        Add add = new Add();
        Multiple multiple = new Multiple();

        Thread thread = new Thread(add);
        Thread thread1 = new Thread(multiple);

        thread.start();
        thread1.start();
    }
}
class Add implements Runnable{
    public void run() {
        for (int i = 0; i < 5; i++) {
            System.out.println("加法线程结果："+(1+1));
        }
    }
}

class Multiple implements Runnable{
    public void run() {
        for (int i = 0; i < 5; i++) {
            System.out.println("乘法线程结果："+(5*5));
        }
    }
}

